package MapReduce.Demo7_TextSort;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import utils.JobSubmit;

import java.io.IOException;

/**
 * @Author lixinlei
 * @Date 2023/3/20 11:00
 */
public class TextSortApp {

    public static class TSMapper extends Mapper<LongWritable, Text,Text, NullWritable>{
        @Override
        protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, NullWritable>.Context context) throws IOException, InterruptedException {

            context.write(value,NullWritable.get());
        }
    }


    public static void main(String[] args) {
        JobSubmit.submitBaseJob(
                TextSortApp.class,
                args,
                TextSortComparator.class
        );
    }

}
